<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <table border="1" frame="box">
            <tr>
                <th>ID</th>
                <th>姓名</th>
                <th>年龄</th>
                <th>性别</th>
            </tr>
            <tr v-for="(user,index) in users">
                <td>{{index+1}}</td>
                <td>{{user.name}}</td>
                <td>{{user.age}}</td>
                <td>{{user.gender}}</td>
            </tr>
        </table>
    </div>
    <script src="./js/vue.js"></script>
    <script>
        var app = new Vue({
            el: "#app",
            data: {
                user: {
                    'name': '',
                    'age': '',
                    'gender': ''
                },
                users: [{
                    'name': '张三',
                    'age': '18',
                    'gender': '男'
                }, {
                    'name': '李四',
                    'age': '19',
                    'gender': '女'
                }, {
                    'name': '王五',
                    'age': '30',
                    'gender': '男'
                }, {
                    'name': '小淘气',
                    'age': '18',
                    'gender': '女'
                }]
            }
        })
    </script>
</body>

</html>